package com.itheima.edu.info.manager.day12;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class Prop {
    public static void main(String[] args) throws IOException {
        out();

        //输出
        FileReader filereader = new FileReader("b.properties");
        Properties properties = new Properties();
        properties.load(filereader);
        System.out.println(properties);
    }

    //输入
    private static void out() throws IOException {
        FileWriter filereader = new FileWriter("b.properties");
        Properties properties = new Properties();
        properties.put("mnb", "999");
        properties.put("mn2", "999");
        properties.put("mn3", "999");
        //null处为注释处，里面可输入注释
        properties.store(filereader, null);
        properties.clone();
    }
}
